package lab02.test06;

/**
 * Created by Lenovo on 2017/10/15.
 */
public class Ladder {
    //属性:
    double above,bottom,height,area;
    //行为：
    public Ladder(double a,double b,double c){
        this.above=a;
        this.bottom=b;
        this.height=c;
    }
    //构造函数：
    public double Larea(){
        area=(above+bottom)*height/2;
        return area;
    }
    //main函数：
    public static void main(String[] args) {
        Ladder Larea1=new Ladder(2,6,1);
        System.out.println("梯形面积是："+Larea1.Larea());
    }
}
